Skip to content

Name the load cause when a module manifest is rejected - #299

Merged
kreneskyp merged 3 commits into
mainfrom
luna5/plat-1713
Dec 4, 2026
Merged

kreneskyp merged 3 commits into
mainfrom
luna5/plat-1713

Conversation

@kreneskyp

@kreneskyp kreneskyp commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Problem

quire schema FR --module <dir> on a module whose manifest the engine rejects (spec-artifacts-iso v0.24.0: semantic: block carries semantic_core) printed a bare UnknownArchetype: 'FR' is not registered, exit 3. The tolerant load keeps the module name with zero archetypes and records the cause only in Registry::failures().

Change

  • Spec first: FR-009-AC-6 and its Behavior SHALL. An archetype rejected at load (an unknown semantic: key, a missing frontmatter_schema_ref) is reported with its cause whether the module's other archetypes load or none do. An undeclared name still reports UnknownArchetype.
  • schema (src/commands/schema.rs): when the contract lookup fails, it looks in registry.failures() for an entry for the requested archetype and fails with module load failed: <reason> (<manifest path>); otherwise it keeps the original error.
  • Scope: only schema. The shared loaders and validate are unchanged, so no other command's load behaviour moves.
  • Tests it_064_schema_reports_rejected_manifest_cause (all archetypes rejected) and it_065_schema_reports_one_rejected_archetype_among_loaded (BAD names the cause and path, FR still loads, an undeclared name still gives UnknownArchetype). Both build the broken module at test time.

Module side (spec-artifacts-iso)

Cause of the v0.24.0 failure: the semantic.semantic_core key, removed in v0.25.0 (deleting that line from the 0.24.0 manifest loads it). npm latest 0.29.0 loads with current quire 0.53.5 (quire schema FR --module <npm pack dir> exits 0); it prints two UnknownEdgeType soup_requirement_for advisories by design (declared in spec-objects-security). No module PR needed.

Criteria and checks

Criteria: FR-009-AC-6. Focused tests: cli_schema, cli_lint, cli_validate pass; clippy -D warnings on the touched tests clean.

🤖 Generated with Claude Code

kreneskyp and others added 2 commits December 4, 2026 10:23
…hetype

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
schema and the other module-loading commands reported a bare
UnknownArchetype when a module loaded with a rejected manifest.
A shared check now fails with the recorded reason and manifest path.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@kreneskyp
kreneskyp requested a review from a team as a code owner December 4, 2026 19:38
Narrow the change to the schema command: it reports the recorded load
failure for the requested archetype, whether or not other archetypes
load. Shared loaders and validate are unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@kreneskyp
kreneskyp merged commit 8e630b8 into main Dec 4, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant